package com.mxpio.erp.common.technology.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.Date;

/**
 * @Author : wpp
 * @Datetime : 2023/7/28 10:27
 * @Desc :
 * @Modor :  Modifytime:
 * @modDesc :
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_TECHNOLOGY_PROD_ROUT_PROC_TMP")
@Schema(description="产品工艺路线明细_TMP")
public class ProdTecRoutProcTmp extends BaseEntity {

    private static final long serialVersionUID = 1L;
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    private String id;

    @Column(name = "PROCESS_ORDER_" )
    @Schema(description  = "工艺序号")
    private Integer processOrder;

    @Column(name = "ROUT_ID_", updatable = false)
    @Schema(description = "路线主键")
    private String routId;
    /*
    @Column(name = "ROUT_NAME_" )
    @Schema(description  = "工艺路线名称")
    private String routName;*/

    @Column(name = "BEGIN_TIME_")
    @Schema(description = "生效日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date beginTime;

    @Column(name = "END_TIME_")
    @Schema(description = "失效日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;
    @Column(name = "PROC_GROUP_CODE_")
    @Schema(description  = "工序段编码")
    private String procGroupCode;

    @Column(name = "PROC_GROUP_NAME_" )
    @Schema(description  = "工序段名称")
    private String procGroupName;


    @Column(name = "PREPARATION_TIME_" )
    @Schema(description  = "标准准备工时（S）")
    private Integer preparationTime;

    @Column(name = "SINGLE_PIECE_TIME_" )
    @Schema(description  = "单件标准工时（S）")
    private Integer singlePieceTime;

    @Column(name = "PROCESS_CODE_")
    @Schema(description  = "工序编码")
    private String processCode;

    @Column(name = "TMP_CRUD_TYPE_")
    @Schema(description = "数据状态")
    private String tmpCrudType;

    @Column(name = "ROUT_PROC_ID_", updatable = false)
    @Schema(description = "原始生效工序行ID")
    private String routProcId;
    @Transient
    private ProcessInfo processInfo;

}
